'use strict';

const { validatorNoZhCn } = require('../common/index');

module.exports = {
  userName: [
    { required: true, message: '用户名必填' },
    { type: 'string', message: '用户名必须为字符串' },
    {
      validator: validatorNoZhCn('用户名'),
    },
    { min: 4, max: 20, message: '昵称长度必须在4-20之间' },
  ],
  nickName: [
    { required: true, message: '用户昵称必填' },
    { type: 'string', message: '用户名必须为字符串' },
  ],
  password: [
    { required: true, message: '密码必填' },
    { type: 'string', message: '密码必须为字符串' },
    { min: 6, max: 20, message: '密码长度必须在6-20之间' },
  ],
};
